var Click = {
  getHtmlElementAbsoluteCoordinates : function(click_source) {
    if (!(click_source instanceof HTMLElement)) {
      return;
    }
    var offset = { x : 0, y : 0 };
    for (var e = click_source; e != null; e = e.offsetParent) {
      if ($(e).css("position") == "relative") {
        break;
      }
      offset.x += e.offsetLeft;
      offset.y += e.offsetTop;
    }
    return offset;
  }
};